package bairui.international.console.web.controller.barter.category.product;

import com.lianjing.sh.spring.web.controller.enhance.module.Module;
import com.lianjing.sh.spring.web.controller.enhance.module.ModuleHead;

/**
 *
 * Module_ProductPropertyEdit
 *
 */
class Module_ProductPropertyEdit{

	
	public Module module(
		Model bean
		, 
		C_Barter_Category_ProductPropertyEdit_Edit.Edit.Operate c_Barter_Category_ProductPropertyEdit_Edit_Edit_Operate
				, 
		java.util.List<bairui.international.model.domain.jpa.TB_ProductPropertyItem> property
		,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
		
	){
		return moduleTemplate(
				bean
				, 
				c_Barter_Category_ProductPropertyEdit_Edit_Edit_Operate
						, 
				property
				,editors
			);
	}
	
	public Module module(
		java.util.List<Model> bean
		, 
		C_Barter_Category_ProductPropertyEdit_Edit.Edit.Operate c_Barter_Category_ProductPropertyEdit_Edit_Edit_Operate
				, 
		java.util.List<bairui.international.model.domain.jpa.TB_ProductPropertyItem> property
		,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
		
	){
		return moduleTemplate(
				bean
				, 
				c_Barter_Category_ProductPropertyEdit_Edit_Edit_Operate
						, 
				property
				,editors
			);
	}
	
	
	/**
	 * 编辑模块
	 */
	private Module moduleTemplate(
		Object bean
		, 
		C_Barter_Category_ProductPropertyEdit_Edit.Edit.Operate c_Barter_Category_ProductPropertyEdit_Edit_Edit_Operate
				, 
		java.util.List<bairui.international.model.domain.jpa.TB_ProductPropertyItem> property
		,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
		
	){
		return
			new Module(
					new ModuleHead("产品属性编辑")
					, 
					new com.lianjing.sh.spring.web.controller.enhance.module.body.EditModuleBody(
							bean, 
							Model.class,
							c_Barter_Category_ProductPropertyEdit_Edit_Edit_Operate, 
							Relation.relations(
									property
								)
							,editors
						)
				);
	}
	
	/**
	 * 输入模型
	 */
	static public class Models {
		private @lombok.Getter @lombok.Setter java.util.List<Model> models = new java.util.ArrayList<>();
	}
	
	@org.springframework.stereotype.Component("bairui.international.console.web.controller.barter.category.product.Module_ProductPropertyEdit$Model")
	
	static public class Model
	
	 extends bairui.international.model.domain.jpa.TB_Product
	
	 implements 
	
		com.lianjing.sh.spring.web.controller.enhance.input.InputModelable
	
	{
	
	
	
		/**
	
		 * 默认构造函数
	
		 */
	
		public Model(){}
	
	
	
		/**
	
		 * 构造函数
	
		 */
	
		public Model(
	
			bairui.international.model.domain.jpa.TB_Product bean,
	
			String propertyName
	
		, 	bairui.international.model.domain.jpa.TB_ProductPropertyItem property
	
		){
	
			if(null != bean){
	
				this.setId(bean.getId());
	
			}
	
			this.setPropertyName(propertyName);
	
			this.setProperty(property);
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("属性名称")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(1001)
	
		@javax.validation.constraints.Size(min=0, max=100)
	
		@com.lianjing.sh.spring.web.controller.enhance.input.annotation.Disabled
	
		@com.lianjing.sh.spring.web.controller.enhance.input.annotation.Title
	
		/** get[属性名称] */
	
		public String getPropertyName() {
	
			return this.propertyName;
	
		}
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("属性")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(2001)
	
		@javax.validation.constraints.NotNull
	
		/** get[属性] */
	
		public bairui.international.model.domain.jpa.TB_ProductPropertyItem getProperty() {
	
			return this.property;
	
		}
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("id")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(3001)
	
		@javax.validation.constraints.NotNull
	
		@javax.validation.constraints.Max(Long.MAX_VALUE)
	
		@javax.validation.constraints.Min(Long.MIN_VALUE)
	
		@com.lianjing.sh.spring.web.controller.enhance.input.annotation.Hide
	
		@Override
	
		public Long getId() {
	
			return (Long)super.getId();
	
		}
	
		
	
	
	
		/**
	
		 * 非继承属性
	
		 */
	
		private String propertyName;
	
		/** set[属性名称] */
	
		public void setPropertyName(String propertyName) {
	
			this.propertyName = propertyName;
	
		}
	
		private bairui.international.model.domain.jpa.TB_ProductPropertyItem property;
	
		/** set[属性] */
	
		public void setProperty(bairui.international.model.domain.jpa.TB_ProductPropertyItem property) {
	
			this.property = property;
	
		}
	
	
	
		/**
	
		 * 得到输入属性
	
		 */
	
		/** 得到属性名称 */
	
		public String gainPropertyName() {
	
			return this.getPropertyName();
	
		}
	
		/** 得到属性 */
	
		public bairui.international.model.domain.jpa.TB_ProductPropertyItem gainProperty() {
	
			return this.getProperty();
	
		}
	
		/** 得到 */
	
		public Long gainId() {
	
			return this.getId();
	
		}
	
	
	
		/**
	
		 * 转换到表单数据格式
	
		 */
	
		public java.util.Map<String, String> toFormData() throws com.sh_lianjing.serialize.json.jackson.exception.JsonException{
	
			return com.lianjing.sh.web.common.util.Util_Form.beanToFormDataFormat(this);
	
		}
	
	
	
	}
	
	
	
	static public class Relation
	{
		public static java.util.Map<String, java.util.List<?>> relations(
			java.util.List<bairui.international.model.domain.jpa.TB_ProductPropertyItem> property
		){
			java.util.Map<String, java.util.List<?>> map = new java.util.HashMap<>();
				map.put("property", property);
			return map;
		}
	}
	
	
	
	/**
	 * 输出模型
	 */
	

}
